home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Sound / MidI / BARS&PIPESPROF2,0-2.DMS / in.adf / Yak Source Code / YakSource.LZH / bppro.h next >
Encoding:
C/C++ Source or Header  |  1993-02-16  |  27.4 KB  |  677 lines

  1. /*
  2.   Bars&Pipe Pro header file 2/16/93
  3.   
  4.   This is a subset of the complete header file.  Call the
  5.   Blue Ribbon Soundworks at (404) 315-0212 to find out about
  6.   Rules For Tools - the complete kit for creating your own
  7.   tools & accessories for Bars&Pipes Pro.
  8. */
  9. #define MIDI_NOTEOFF    0x80
  10. #define MIDI_NOTEON    0x90
  11. #define MIDI_PTOUCH    0xA0
  12. #define MIDI_CCHANGE    0xB0
  13. #define MIDI_PCHANGE    0xC0
  14. #define MIDI_MTOUCH    0xD0
  15. #define MIDI_PBEND    0xE0
  16. #define MIDI_SYSX    0xF0
  17. #define MIDI_MTC    0xF1
  18. #define MIDI_SONGPP    0xF2
  19. #define MIDI_SONGS    0xF3
  20. #define MIDI_EOX    0xF7
  21. #define MIDI_CLOCK    0xF8
  22. #define MIDI_START    0xFA
  23. #define MIDI_CONTINUE    0xFB
  24. #define MIDI_STOP    0xFC
  25. #define MIDI_SENSE    0xFE
  26.  
  27. #define EVENT_ONTIME    0x10        /* This event is an on-time event. */
  28. #define EVENT_BRANCH    0x20        /* This event is traversing a branch. */
  29. #define EVENT_PADEDIT    0x40        /* Not a real time event. */
  30. #define EVENT_PLAYONLY    0x80        /* Discard event when recording. */
  31. #define EVENT_VOICE    1        /* Performance event */
  32. #define EVENT_SYSX    2        /* System exclusive event. */
  33. #define EVENT_LYRIC    3        /* Lyric string. */
  34. #define EVENT_TIMESIG    4        /* Time signature change event. */
  35. #define EVENT_KEY    5        /* Key change event. */
  36. #define EVENT_CHORD    6        /* Chord change event. */
  37. #define EVENT_RHYTHM    7        /* Rhythm template event. */
  38. #define EVENT_DYNAMICS    8        /* Dynamics event. */
  39. #define EVENT_SEED    9        /* Use to seed repeating tools. */
  40.  
  41. struct Event {
  42.     struct Event *next;            /* The next event in the list. */
  43.     long time;                /* When this event occurs. */
  44.     char type;                /* What type of event. */
  45.     unsigned char status;        /* MIDI status. */
  46.     unsigned char byte1;        /* First byte of data. */
  47.     unsigned char byte2;        /* Second byte of data. */
  48.     long data;                /* Data storage. */
  49.     struct Tool *tool;            /* Tool that processes this next. */
  50. };
  51.  
  52. struct EventList {
  53.     struct Event *first;        /* First in list. */
  54.     struct Event *point;        /* Current position in list. */
  55. };
  56.  
  57. struct NoteEvent {
  58.     struct NoteEvent *next;        /* The next event in the list. */
  59.     long time;                /* When this event occurs. */
  60.     char type;                /* What type of event. */
  61.     unsigned char status;        /* MIDI status. */
  62.     unsigned char value;        /* Note value. */
  63.     unsigned char velocity;        /* Note velocity. */
  64.     unsigned short duration;        /* The duration of this event. */
  65.     short data;                /* Data storage. */
  66.     struct Tool *tool;            /* Tool that processes this next. */
  67. };
  68.  
  69. struct TimeSigList {
  70.     struct TimeSigEvent *first;        /* First in list. */
  71.     struct TimeSigEvent *point;        /* Current position in list. */
  72.     unsigned short measure;        /* Current measure. */
  73.     unsigned short beat;        /* Current beat. */
  74.     unsigned short clock;        /* Current clock. */
  75. };
  76.  
  77. struct Clip {
  78.     struct Clip *next;            /* List of clips. */
  79.     struct EventList events;        /* Event list. */
  80.     struct EventList chords;        /* List of bass chords. */
  81.     struct EventList keys;        /* List of keys. */
  82.     struct EventList lyrics;        /* List of lyrics. */
  83.     struct EventList rhythm;        /* List of rhythm templates. */
  84.     struct EventList dynamics;        /* List of dynamic changes. */
  85.     struct TimeSigList timesig;        /* List of time signatures. */
  86.     struct String *name;        /* Name of this clip. */
  87.     struct String *notes;        /* Notes for this clip. */
  88.     long begin;                /* Time this begins. */
  89.     long end;                /* Time this ends. */
  90.     unsigned char highnote;        /* Highest note, for display. */
  91.     unsigned char lownote;        /* Lowest note, for display. */
  92.     char locked;            /* Locked during record. */
  93. };
  94.  
  95. struct Tool {
  96.     struct Tool *next;            /* Next tool used by this track. */
  97.     struct Tool *branch;        /* Tool on other track. */
  98.     struct Tool *parent;        /* Parent tool (for macros.) */
  99.     struct ToolMaster *toolmaster;    /* Pointer to actual tool. */
  100.     struct Clip *clip;            /* Clip to be worked on. */
  101.     struct String *name;        /* Name of this tool. */
  102.     struct Window *window;        /* Edit window. */
  103.     struct Track *track;        /* Track that owns this tool. */
  104.     long toolid;            /* Tool ID. */
  105.     unsigned short left,top;        /* Position of edit window. */
  106.     unsigned short width,height;    /* Size of edit window. */
  107.     unsigned short x,y;            /* Position in pipe display. */
  108.     unsigned short xindex;        /* How far down list this is. */
  109.     unsigned short yindex;        /* How far down track list this is. */
  110.     short branchindex;            /* How far away branch tool is. */
  111.     unsigned short id;            /* ID for file io. */
  112.     char intool;            /* True if inlist, false if outlist. */
  113.     char inedit;            /* Flag to indicate editing now. */
  114.     char touched;            /* This tool has been edited. */
  115.     char selected;            /* Icon selected in graph. */
  116.     long tooltype;            /* Sequence? Input? Branch? */
  117.                     /* More tool unique stuff here... */
  118. };
  119.  
  120. #define TOUCH_EDIT        1    /* Tool has been edited. */
  121. #define TOUCH_INIT        2    /* Tool has been initialised. */
  122.  
  123. #define TOOL_SEQUENCE        1    /* This is actually the track. */
  124. #define TOOL_INPUT        2    /* This is an input tool. */
  125. #define TOOL_OUTPUT        4    /* This is an output tool. */
  126. #define TOOL_NORMAL        8    /* This is a normal tool. */
  127. #define TOOL_ONTIME        0x10    /* This tool doesn't accept early events. */
  128. #define TOOL_BRANCHIN        0x20    /* This tool merges two inputs. */
  129. #define TOOL_BRANCHOUT        0x40    /* This tool has two outputs. */
  130. #define TOOL_MACRO        0x80    /* This tool is a macro tool. */
  131. #define TOOL_MACROOUT        0x100    /* This is the output of macro. */
  132. #define TOOL_MACROBRANCH    0x200    /* This is the branch output of macro. */
  133. #define TOOL_MACROIN        0x400    /* This is the input of macro. */
  134. #define TOOL_GROUPIN        0x800    /* This tool part of group input. */
  135. #define TOOL_MIDI        0x1000    /* This tool is MIDI capable. */
  136. #define TOOL_NOTPIPE        0x2000    /* This tool can not go in pipeline. */
  137. #define TOOL_NOTPAD        0x3000    /* This can not go in the toolpad. */
  138. #define TOOL_STOOL        0x4000  /* This is a sequencer tool. */
  139.  
  140. #define MMCMD_COPYALLFILES      0x0001  /* pass the path name to copy to */
  141. #define MMCMD_INSTALLHITLIST    0x0002  /* no parameters */
  142. #define MMCMD_CONVERTTOHIRES    0x0003  /* no parameters */
  143. #define MMCMD_CONVERTFROMHIRES  0x0004  /* no parameters */
  144.  
  145. struct ToolMaster {
  146.     struct ToolMaster *next;            /* Next tool in this list. */
  147.     long toolid;                        /* Tool ID. */
  148.     struct Image *image;                /* Icon for this tool. */
  149.     struct Image *upimage;              /* Icon for branching up. */
  150.     short x,y;                          /* Position in toolbox for display. */
  151.     char name[99];                      /* Tool name. */
  152.     char inuse;                /* Records instance of Tool for file io. */
  153.     char filename[100];                 /* Where it is stored on disk. */
  154.     struct Tool *(*createtool)();       /* Routine to allocate a new tool. */
  155.     void (*edittool)();                 /* Routine to edit tool parameters. */
  156.     struct Event *(*processevent)();    /* Routine to process an event. */
  157.     struct Event *(*processlist)();     /* Routine to process a list of events. */
  158.     void (*deletetool)();               /* Routine to delete a tool. */
  159.     void (*removetool)();               /* Routine to close down. */
  160.     long (*savesize)();                 /* Returns size prior to save. */
  161.     long (*savetool)();                 /* Routine to save to disk. */
  162.     struct Tool *(*loadtool)();         /* Routine to load from disk. */
  163.     void (*readsysex)();                /* Pass sysex byte */
  164.     long (*multimediafunc)();           /* passed tool ptr,(long)command,
  165.                                            variable params. */
  166.     void (*drawtoolicon)();             /* pass tool ptr,rastport,x,y,wid,height */
  167.     long segment;                       /* This tool's segment list. */
  168.     long altsegment;
  169.     struct Track *intrack;              /* Input track for this tool. */
  170.     short toolsize;                     /* Tool size for loading and saving. */
  171.     char inedit;                        /* Flag to indicate editing now. */
  172.     char selected;                      /* Icon selected in graph. */
  173.     long tooltype;                      /* Type of tool. */
  174. };
  175.  
  176. #define HITNAMESIZE    30
  177.  
  178. struct HitName {
  179.     struct HitName *next;        /* Linked list. */
  180.     unsigned char note;            /* Equivalent MIDI value. */
  181.     char name[HITNAMESIZE];        /* Text. */
  182. };
  183.  
  184. struct Accessory {
  185.     struct Accessory *next;        /* Next accessory in this list. */
  186.     long id;                /* Accessory ID. */
  187.     struct Image *image;        /* Icon for this accessory. */
  188.     struct Image *onimage;        /* Icon for when selected. */
  189.     char name[100];            /* Name. */
  190.     char filename[100];            /* Where it is stored on disk. */
  191.     struct Window *window;
  192.     unsigned short left,top;        /* Position of edit window. */
  193.     unsigned short width,height;    /* Size of edit window. */
  194.     unsigned short x,y;            /* Position in access box. */
  195.     long (*remove)();
  196.     long (*edit)();            /* Routine to edit accessory. */
  197.     long (*open)();            /* Routine to open it. */
  198.     long (*close)();
  199.     long (*size)();
  200.     long (*save)();
  201.     long (*load)();
  202.     long (*install)();            /* Install in environment. */
  203.     long (*clear)();            /* Clear from environment. */
  204.     long (*expandc)();            /* Future routine? */
  205.     long segment;            /* This accessory's segment list. */
  206.     long altsegment;            /* Alternate segment list. */
  207.     char selected;            /* Icon selected in graph. */
  208. };
  209.  
  210. #define TC_START    1
  211. #define TC_STOP        2
  212. #define TC_POSITION    3
  213. #define TC_RECORDON    4
  214. #define TC_RECORDOFF    5
  215. #define TC_PLAY        6
  216. #define TC_TICK        7
  217.  
  218. struct Functions {
  219.     char locked;
  220.     char measureres;            /* Cuts resolve to measures. */
  221.     char recording;            /* Set when recording. */
  222.     char running;            /* Set when running. */
  223.     char punchenabled;            /* Auto punch in and out enabled. */
  224.     char loopenabled;            /* Loop mode turned on. */
  225.     char clicking;            /* Click track on? */
  226.     char seeclick;            /* Visual metronome. */
  227.     char multiin;            /* Multiple inputs? */
  228.     char clickchannel;            /* MIDI CLick channel. */
  229.     char midiclock;            /* Sync to MIDI clocks. */
  230.     char smpteclock;            /* Sync to SMPTE. */
  231.     char sendmidiclock;            /* Send out MIDI clocks. */
  232.     char smptetype;            /* Which SMPTE format. */
  233.     char countdown;            /* Do count down. */
  234.     char midiclick;            /* Use MIDI for click track. */
  235.     char chop;
  236.     long leadinstart;            /* Length of lead in. */
  237.     long timenow;            /* Current time. */
  238.     unsigned long markone;        /* Auto locate register. */
  239.     unsigned long marktwo;        /* Auto locate register. */
  240.     unsigned long punchin;        /* Punch in point. */
  241.     unsigned long punchout;        /* Punch out point. */
  242.     unsigned long loopin;        /* Loop in point. */
  243.     unsigned long loopout;        /* Loop out point. */
  244.     unsigned long cutin;        /* Cut in point. */
  245.     unsigned long cutout;        /* Cut out point. */
  246.     long starttime;            /* Where to play from. */
  247.     long stoptime;            /* Marker to stop at. */
  248.     unsigned long padcutin;        /* For non real time edits. */
  249.     unsigned long padcutout;        /* For non real time edits. */
  250.     unsigned long songlength;
  251.     long startoffset;            /* Starting hi res clock offset. */
  252.     unsigned short tempos[4];
  253.     unsigned short tempo;        /* Current tempo. */
  254.     unsigned short inittempo;        /* Initial tempo. */
  255.     char songname[100];
  256.     char author[100];
  257.     short palette[8];            /* Colors. */
  258.     char remotecontrol[128];        /* Table of remote controls. */
  259.     unsigned long markthree;        /* Auto locate register. */
  260.     unsigned long markfour;        /* Auto locate register. */ 
  261.     unsigned char volumenum;        /* Mix Maestro Volume CC. */
  262.     unsigned char pannum;        /* Mix Maestro Pan CC. */
  263.     unsigned char subdivide;        /* Metronome subdivision. */
  264.     char bypassmix;            /* Use undo buffer. */
  265.     long savestop;            /* Place to save stop sign. */
  266.     long printflags;            /* Print flags. */
  267.     unsigned long recordfilters;
  268.     long userlength;            /* User defined song length. */
  269.     long saveflags;
  270.     long more[4];            /* Expansion space. */
  271.     struct Tool *midiouttool;        /* Tool to send MIDI Metronome. */
  272.     struct Tool *clockouttool;        /* Tool to send MIDI Clocks. */
  273.     struct ToolTray *tooltraylist;        /* List of tool trays. */
  274.     struct PatchNames *patchlist;        /* List of patch names lists. */
  275.     struct Song *songlist;        /* For time-line stuff. */
  276.     unsigned long clockcycles;        /* Time in clock cycles! */
  277.     char useclip;            /* Use the ClipBoard. */
  278.     char externclock;            /* External clock flag. */
  279.     short timeroffset;            /* For external clock. */
  280.     struct Event *coordlist;        /* Window coordinates. */
  281.     struct Track *tracklist;        /* Top track in list. */
  282.     struct Clip masterclip;        /* Master key, chord, signature. */
  283.     struct Clip masterundo;
  284.     struct Clip mastercut;
  285.     struct Edit *masteredit;    
  286.     struct Tool *edittools[16];        /* 16 Tools to edit with. */
  287.     unsigned short toolid;        /* Global tool id. */ 
  288.     short groupid;            /* Currently selected group. */
  289.     struct Chord *scalelist;        /* All scales. */
  290.     struct Chord *chordlist;        /* All chords. */
  291.     struct Rhythm *rhythmlist;        /* All rhythms. */
  292.     struct Section *sectionlist;    /* ABA list. */
  293.     struct TempoChange *tempochangelist;/* Tempo Change list. */
  294.  
  295.     long whoops;            /* Time line song list used to be here. */
  296.     long frame;                /* Current frame. */
  297.     unsigned long hirestime;        /* Hi res clock. */
  298.     char version;
  299.     long SysBase;            /* Exec library. */
  300.     long DOSBase;            /* DOS library. */
  301.     long IntuitionBase;
  302.     long GfxBase;
  303.     long LayersBase;
  304.     long standardout;            /* For printf. */
  305.     struct Event *pipequeue;        /* Event queue. */
  306.     struct Event *earlyqueue;        /* Ahead of time queue. */
  307.     struct Screen *screen;        /* Screen we all exist in. */
  308.     struct Window *window;        /* Main window. */
  309.     struct ToolMaster *toolmasterlist;    /* All ToolMasters. */
  310.     struct Accessory *accesslist;    /* All Accessories. */
  311.     struct Tool *wasmidiouttool;    /* Tool to send MIDI Metronome. */
  312.     long (*stealmidi)(void);        /* Steal serial interrupt. */
  313.     long (*releasemidi)(void);        /* Release MIDI. */
  314.     long (*audioclick)(void);        /* Play click sound. */
  315.  
  316.     struct Track *selectedtrack;    /* Track currently selected. */
  317.  
  318.     long flags;                /* Additional flags. */
  319.     char *filename;            /* Pointer to filename buffer. */
  320.     long sunrizeflags;
  321.     struct DisplayFlags *displayflags;    /* Display flags for updateobject. */
  322.     short displaywidth, displayheight;
  323.     char osbits;            /* Used by osms output. */
  324.     char mmrecord;            /* Enable mm record. */
  325.     char padettes[2];
  326.     long pad[54];            /* Room for more. */
  327.  
  328.     long (*removetoolfrommacro)(struct MacroTool *macro,
  329.         struct ToolMaster *toolmaster,
  330.         char remove);
  331.     void (*edittool)(struct Tool *tool);
  332.     void (*addtoolremover)(long (*routine)());
  333.     void (*removetoolremover)(long (*routine)());
  334.  
  335.     void (*drawslice)(struct RastPort *rp,struct Image *image,
  336.     short x,short y,short start,short finish);
  337.     void (*drawtool)(struct Tool *tool,
  338.     struct RastPort *rp,short x,short y,short h);
  339.     long (*checklegaltool)(char *id);   /* for MM tools, check if legal */
  340.  
  341.     void (*settimenow)(long time);    /* Set current time. */
  342.     void (*updateobject)(void *object,void *data);
  343.     void (*linkobject)(struct Window *window,void *object,void (*routine)());
  344.     void (*unlinkobject)(struct Window *window,void *object);
  345.     void (*unlinkwindow)(struct Window *window);
  346.  
  347.     void (*installhitlist)(struct Track *track,struct HitName *list);
  348.  
  349.     void (*settempo)(short tempo);
  350.     void (*installtempochangelist)(struct TempoChange *);
  351.  
  352.     struct Transport *(*installtransportp)(void (*routine)(void),
  353.     char priority);
  354.  
  355.     long (*fastgets)(long,long,long);    /* fgets() */
  356.     long (*fastseek)(long,long,long);    /* Fast seek file io. */
  357.  
  358.     void (*adddisplayserver)(void (*routine)(void),
  359.                       struct Window *window);
  360.     void (*removedisplayserver)(struct Window *window);
  361.  
  362.     struct Tool *(*dragtool)(struct Window *window,
  363.                       struct ToolMaster *toolmaster,
  364.                       struct Tool *copy);
  365.     void (*addtoolserver)(struct Tool * (*routine)(void),
  366.                    struct Window *window);
  367.     void (*removetoolserver)(struct Window *window);
  368.  
  369.     long (*editsysex)(struct Track *track,
  370.               struct StringEvent *stringevent);
  371.     struct Event *(*dupeevent)();    /* Duplicate an event. */
  372.  
  373.     long (*frametotime)(long frame);    /* Convert frame to time. */
  374.     long (*timetoframe)(long time);    /* Convert time to frame. */
  375.     long (*frametohmsf)(long frame);    /* Convert frame to hmsf. */
  376.     long (*hirestotime)(long hires);    /* Hires clock to time. */
  377.     long (*timetohires)(long time);    /* Time to hires. */
  378.     long (*hirestoframe)(long hires);    /* Hires clock to frame. */
  379.     long (*frametohires)(long frame);    /* Frame to hires clock. */    
  380.  
  381.     void (*deletetool)(struct Tool *tool);
  382.     struct Tool *(*createtool)(struct ToolMaster *toolmaster,    
  383.     struct Tool *copy);
  384.     long (*sizetool)(struct Tool *tool);
  385.     long (*savetool)(long file,
  386.               struct Tool *tool);
  387.     struct Tool *(*loadtool)(long file,
  388.     struct ToolMaster *toolmaster,
  389.     long size);
  390.     struct ToolMaster *(*gettoolmaster)(long id);
  391.  
  392. /*    Old routines: */
  393.     
  394.     void (*processsmpteclock)(struct Event *event);
  395.     void (*processmidiclock)(struct Event *event);/* Process a MIDI clock event .*/
  396.     void (*processsysex)();        /* Does nothing. */
  397.     void (*processinputevent)(char command);
  398.  
  399.     long (*clearenvironment)(struct Environment *environ,
  400.     char all);
  401.     long (*installenvironment)(struct Environment *environ);
  402.     long (*loadsong)(long file,struct Environment *environ);
  403.     long (*savesong)(long file,struct Environment *environ);
  404.  
  405.     struct Transport *(*installtransport)(void (*routine)(void));
  406.     void (*removetransport)(void (*routine)(void));/* Remove transport handler. */
  407.     void (*transportcommand)(unsigned char command,
  408.     long time);        /* Send command to handlers. */
  409.  
  410.     void (*qevent)(struct Event *event);/* Put event in queue. */
  411.     struct Event *(*allocevent)();    /* Allocate an event. */
  412.     struct Event *(*fastallocevent)();    /* Allocate an event from interrupt. */
  413.     void (*freeevent)(struct Event *event);/* Free an event. */
  414.     struct Event *(*sorteventlist)(struct Event *events);
  415.     void (*freelist)(struct Event *list);/* Free a list of events. */
  416.     struct Event *(*dupelist)(struct Event *list); /* Duplicate a list. */
  417.  
  418.     struct String *(*allocstring)(char *text);
  419.     void (*freestring)(struct String *string);
  420.     void (*replacestring)(struct String **string,
  421.                    char *text);
  422.     void (*dupestring)(struct String **string);
  423.     char *(*stringtext)(struct String *string);
  424.  
  425.     void (*clearclip)(struct Clip *clip);/* Clear a clip. */
  426.     void (*dupeclip)(struct Clip *source,
  427.               struct Clip *destination);
  428.     void (*cutclip)(struct Clip *source,
  429.     struct Clip *clip,
  430.     unsigned long begin,
  431.     unsigned long end);
  432.     void (*copyclip)(struct Clip *source,
  433.               struct Clip *clip,
  434.               unsigned long begin,
  435.               unsigned long end);
  436.     void (*pasteclip)(struct Clip *source,
  437.                struct Clip *clip,
  438.                unsigned long begin);
  439.     void (*mixclip)(struct Clip *source,
  440.              struct Clip *clip,
  441.              unsigned long begin,
  442.              unsigned long end);
  443.     struct Clip *(*loadclip)(long filein);
  444.     long (*saveclip)(long filein,
  445.              struct Clip *clip);
  446.     long (*clipboard)(long command,
  447.               struct Clip *clip);
  448.  
  449.     struct Track *(*createtrack)(char new,
  450.     char in);
  451.     void (*deletetrack)(struct Track *track);    /* Delete a track. */
  452.  
  453.     char *(*myalloc)(long size,long flags);    /* Internal allocation routine. */
  454.     void (*myfree)(char *item,long size);    /* Internal free routine. */
  455.  
  456.     long (*doscall)();            /* Make a DOS command. */
  457.     long (*fastopen)(char *name,long mode);    /* Fast file open. */
  458.     long (*fastwrite)(long file,char *buffer,long size);
  459.     long (*fastread)(long file,char *buffer,long size);
  460.     long (*fastclose)(long file);    /* Fast file close. */
  461.  
  462.     long (*popupkey)(struct Window *window,long was);
  463.     long (*popupnote)(struct Window *window,long was);
  464.     long (*popupoctave)(struct Window *window,long was);
  465.     struct Chord *(*popupchord)(struct Chord *old);
  466.     struct Rhythm *(*popuprhythm)(struct Rhythm *old);
  467.     struct Chord *(*popupscale)(struct Chord *old);
  468.  
  469.     long (*measuretotime)(struct Clip *clip,unsigned short measure);
  470.     long (*timetomeasure)(struct Clip *clip,long time);
  471.     long (*totalbeatstotime)(struct Clip *clip,unsigned long beats);
  472.     long (*timetototalbeats)(struct Clip *clip,unsigned long time);
  473.     void (*lengthtostring)(struct Clip *clip,
  474.                     unsigned long time,
  475.                     unsigned long length,
  476.                     char *buffer);
  477.     unsigned long (*stringtolength)(struct Clip *clip,
  478.                              unsigned long time,
  479.                              char *buffer,
  480.                              unsigned long length);
  481.     void (*timetostring)(struct Clip *clip,
  482.     long time,
  483.     char *buffer);
  484.     unsigned long (*stringtotime)(struct Clip *clip,
  485.     char *buffer,
  486.     unsigned long time);
  487.     void (*frametostring)(long frame,
  488.     char *buffer);
  489.     unsigned long (*stringtoframe)(char *buffer,
  490.     unsigned long frame);
  491.     void (*notetostring)(struct Clip *clip,
  492.     unsigned short note,
  493.         char *string);
  494.     short (*stringtonote)(char *string);
  495.  
  496.     long (*noteinkey)(struct Clip *clip,
  497.               struct NoteEvent *note);
  498.     long (*noteinchord)(struct Clip *clip,
  499.               struct NoteEvent *note);
  500.     long (*noteinrhythm)(struct Clip *clip,
  501.               struct NoteEvent *note);
  502.     struct KeyEvent *(*timetokey)(struct Clip *clip,
  503.     unsigned long time);
  504.     struct ChordEvent *(*timetochord)(struct Clip *clip,
  505.     unsigned long time);
  506.     unsigned short (*timetodynamics)(struct Clip *clip,
  507.     long time);
  508.     struct NoteEvent *(*nextrhythmbeat)(struct Clip *clip,
  509.     long time,
  510.     long *eventtime);
  511.     long (*scaletotwelve)(struct Clip *clip,
  512.     unsigned long time,
  513.     char value);
  514.     long (*twelvetoscale)(struct Clip *clip,
  515.     unsigned long time,
  516.     char value,
  517.     char *offset);
  518.     long (*random)(long range);        /* Return random number. */
  519.  
  520.     long (*areyousure)(char *text);    /* Put up "are you sure?" requester. */
  521.     void (*openwait)(void);        /* Open wait requester. */
  522.     void (*closewait)(void);        /* Close wait requester. */
  523.  
  524.     void (*display)(long refresh);    /* Display main window. */
  525.     struct ListNode *(*ScrollingPopUpMenu)(struct Screen *screen,
  526.     struct ListNode *list,
  527.     void (*displayroutine)(void),
  528.     short itemheight,
  529.     short itemwidth,
  530.     short count);
  531.     void (*DragSlider)(long window,
  532.     long gadget,
  533.     long width,
  534.     long routine,
  535.     char axis);
  536.     void (*DrawSlider)(long window,
  537.     long gadget,
  538.     long position,
  539.     long width,
  540.     long routine,
  541.     char axis);
  542. /*    Inovatools 1 routines. */
  543.     long (*Itoa)(long i,char *s,long r);
  544.     long (*Atoi)(char *s,long r);
  545.     void (*RefreshGadget)(struct Window *window,
  546.     long id);
  547.     struct Gadget *(*GetGadget)(struct Window *window,
  548.     unsigned short id);
  549.     struct StringInfo *(*GetStringInfo)(struct Window *window,
  550.     unsigned short id);
  551.     void (*SetStringInfo)(struct Window *window,
  552.     unsigned short id,
  553.     char *string);
  554.     long (*GetStringInfoNumber)(struct Window *window,
  555.     unsigned short id,
  556.     unsigned short base);
  557.     void (*SetStringInfoNumber)(struct Window *window,
  558.     unsigned short id,
  559.     long number,
  560.     long base);
  561.     struct PropInfo *(*GetPropInfo)(struct Window *window,
  562.     unsigned short id);
  563.     void (*SetPropInfo)(struct Window *window,
  564.     unsigned short id,
  565.     unsigned short hpos,
  566.     unsigned short vpos);
  567.     struct IntuiMessage *(*GetSelectIntuiMessage)(
  568.     struct Window *window,
  569.     unsigned long type);
  570.     struct IntuiMessage *(*GetIntuiMessage)(struct Window *window);
  571.     void (*ClearIntuiMessages)(struct Window *window);
  572.     struct Menu *(*GetMenu)(
  573.     struct Menu *menulist,
  574.     long menunum);
  575.     struct MenuItem *(*GetMenuItem)(
  576.     struct Menu *menu,
  577.     long menunum,
  578.     long itemnum,
  579.     long subitemnum);
  580.     void (*CheckMenuItem)(
  581.     struct Menu *menu,
  582.     long menunum,
  583.     long itemnum,
  584.     long subitemnum,
  585.     long on);
  586.     void (*EnableMenuItem)(
  587.     struct Menu *menu,
  588.         long menunum,
  589.         long itemnum,
  590.         long subitemnum,
  591.         long on);
  592.     void (*EnableMenu)(
  593.     struct Menu *menu,
  594.     long menunum,
  595.     long on);
  596.     void (*EnableGadget)(
  597.     struct Window *window,
  598.         short id,
  599.         short on);
  600.     void (*SelectGadget)(
  601.     struct Window *window,
  602.         short id,
  603.         short on);
  604.     struct NewWindow *(*DupeNewWindow)(struct NewWindow *nw);
  605.     void (*DeleteNewWindow)(struct NewWindow *nw);
  606.     struct Menu *(*DupeMenu)(struct Menu *source);
  607.     void (*DeleteMenu)(struct Menu *list);
  608.     void (*SendCloseWindow)(struct Window *window);
  609.     long (*List_Len)();
  610.     long (*List_Position)();
  611.     struct ListItem *(*List_Pred)();
  612.     struct ListItem *(*List_Index)();
  613.     struct ListItem *(*List_Cat)();
  614.     struct ListItem *(*List_Insert)();
  615.     struct ListItem *(*List_Remove)();
  616.     void (*SetScrollBar)(struct ListInfo *info);
  617.     void (*DrawList)(struct ListInfo *info);
  618.     void (*ScrollList)(struct ListInfo *info);
  619.     struct ListItem *(*SizeList)(struct ListInfo *li);
  620.     struct ListItem *(*InitListInfo)(struct ListInfo *li);
  621.     void (*RemoveListInfo)(struct ListInfo *li);
  622.     struct ListItem *(*GetListItem)(struct ListInfo *li);
  623.     void (*ClickList)(struct ListInfo *li,short id);
  624.     void (*InsertListItem)(struct ListInfo *li,struct ListItem *item);
  625.     struct ListItem *(*RemoveListItem)(struct ListInfo *li);
  626.     short (*PopUpMenu)(struct Window *window,struct Menu *menu);
  627.     void (*DragGadget)(struct Window *window,struct DragInfo *g);
  628.     void (*FileName)(
  629.     char *blankstring,
  630.         char *prompt,
  631.         char *ptemplate,
  632.         struct Screen *screen,
  633.         short mode,
  634.         short x,
  635.         short y);
  636.     struct Window *(*FlashyOpenWindow)(struct NewWindow *new);
  637.     void (*FlashyCloseWindow)(struct Window *window);
  638.     struct Window *(*WhichWindow)(struct Window *window,
  639.     short x,
  640.         short y);
  641.     struct ListInfo *(*DupeListInfo)(struct ListInfo *listinfo);
  642.     void (*DeleteListInfo)(struct ListInfo *listinfo);
  643.     void (*RealTimeScroll)(struct ListInfo *li);
  644.     void (*EmbossOn)(struct Window *,short ,short );
  645.     void (*EmbossOff)(struct Window *,short );
  646.     void (*DrawEmbossed)(struct Window *,short );
  647.     void (*EnableEmbossed)(struct Window *,short ,short );
  648.     void (*SelectEmbossed)(struct Window *,short ,short );
  649.     void (*ModifyEmbossedProp)(struct Window *,short,long,long,long,long,long,long);
  650.     long (*DragEmbossedProp)(struct Window *,short );
  651.     long (*DrawEmbossedProp)(struct Window *,short );
  652.     long (*ShiftEmbossedPropOnce)(struct Window *,short,short,short );
  653.     long (*ShiftEmbossedProp)(struct Window *,short,short ,short );
  654.     long (*EmbossedPropOn)(struct Window *,short,long (*)(void),unsigned short ,
  655.          unsigned short );
  656.     void (*FatEmbossedPropOn)(struct Window *,short ,short ,short ,
  657.     long (*)(void),unsigned short ,char );
  658.     void (*EmbossedPropOff)(struct Window *,short );
  659.     void (*FatEmbossedPropOff)(struct Window *,short ,short ,short );
  660.     void (*DrawEmbossedRect)(struct RastPort *,short ,short ,short ,short ,short );
  661.     void (*DrawEmbossedWindow)(struct Window *,short );
  662.     void (*EmbossWindowOff)(struct Window *);
  663.     void (*EmbossWindowOn)(struct Window *,
  664.     long ,char *,unsigned short ,unsigned short ,long (*)(void),long (*)(void));
  665.     void (*EmbossRequestOn)(struct Window *,char *);
  666.     void (*RefreshEmbossedWindowFrame)(struct Window *);
  667.     int (*SystemGadgets)(struct Window *,long ,struct Gadget *,long);
  668.     void (*ModifyWindowProps)(struct Window *,unsigned long ,unsigned long ,
  669.     unsigned long ,unsigned long ,unsigned long ,unsigned long );
  670.     void (*EmbossedWindowTitle)(struct Window *,char *);
  671.     void (*EmbossedWindowText)(struct Window *,char *,short );
  672.     void (*setsmalltext)(struct Window *window,short id,char *name);
  673.     short (*fitsmalltext)(char *text,short length);
  674.     void (*usetopazfont)(struct RastPort *rp);
  675.     void (*usesmallfont)(struct RastPort *rp);
  676. };
  677.